<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	renderKitId="AJAX" xmlns:om="http://www.apusic.com/jsf/misc">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
		<script>
		 	//<![CDATA[
	 	   	function clearSeach(){
	 	   		jsvarloginTime.setValue('');
	 	   		jsvarlogoutTime.setValue('');
	 	   		jsvarloginName.setValue('');
	 	   		jsvarloginIP.setValue('');
	 	   		jsvarvisitedModules.setValue('');
	 	   	}
		   	//]]>
		</script>
	</w:head>
	<w:page title="commonView">
		<w:form groupId="searchcondition" clientValidate="true" msgTarget="side">
			<om:fileDownload for="to_Excel" id="downloadAll" savedName="用户登录记录.xls" />
			<layout:panel border="false" autoHeight="true" autoWidth="true" header="false"
				styleClass="k4-view">
				<layout:panel border="false" autoHeight="true" autoWidth="true" styleClass="k4-form-toolbar">
					<w:toolBar>
						<w:button label="导出EXCEL" id="to_Excel" image="/images/excel.gif" />
					</w:toolBar>
				</layout:panel>
				<layout:panel title="搜索条件" border="false" autoHeight="true" autoWidth="true" collapsible="true"
					collapsed="false" styleClass="k4-view-search">
					<layout:panelGrid columns="4" styleClass="k4-view-search" cellpadding="0" cellspacing="0"
						border="1">
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="登陆开始时间" for="specifiedLoginTime" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:dateField styleClass="k4-form-textfield" id="specifiedLoginTime" jsvar="jsvarloginTime"></w:dateField>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="登陆结束时间" for="specifiedlogoutTime" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:dateField styleClass="k4-form-textfield" id="specifiedlogoutTime" jsvar="jsvarlogoutTime"></w:dateField>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="用户姓名(或 登陆名)" for="userLogName" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField styleClass="k4-form-textfield" id="userLogName" jsvar="jsvarloginName"></w:textField>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="用户IP" for="logIP" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField styleClass="k4-form-textfield" id="logIP" jsvar="jsvarloginIP"></w:textField>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="访问模块" for="visitedModules" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:combo styleClass="k4-form-textfield" id="visitedModules" editable="false"
								jsvar="jsvarvisitedModules">
								<f:selectItems id="modules" />
							</w:combo>
						</layout:cell>
						<layout:cell colspan="2" styleClass="k4-form-fieldvalue">
							<layout:panelGrid columns="2" cellpadding="0" cellspacing="0">
								<w:button id="query" value="搜索" image="/images/search.gif" />
								<w:button id="reset" value="重置" image="/images/clear.gif" immediate="true"
									onclick="clearSeach();" />
							</layout:panelGrid>
						</layout:cell>
					</layout:panelGrid>
				</layout:panel>
				<w:pagingToolbar target="urPanel" for="userLoginRecordsGrid" id="pt1" displayInfo="true"
					displayMsg="显示 {0} - {1}，共 {2} 条" />
				<layout:panel id="urPanel" border="false" autoHeight="true" autoWidth="true" header="false"
					styleClass="k4-view" toolBarPosition="bottom" autoScroll="true">
					<w:dataGrid id="userLoginRecordsGrid" toolBarPosition="top" rows="50" paged="true" var="ou"
						border="false" showRowNumber="true" styleClass="k4-view-datagrid" autoHeight="true"
						selectable="true" height="auto" loadMask="true">
						<w:outputColumn id="userName" header="用户登录名" sortable="true"></w:outputColumn>
						<w:outputColumn id="fullname" header="用户姓名" value="#{ou.userName}" sortable="true"
							converter="userFullnameFormatter"></w:outputColumn>
						<w:outputColumn id="loginTime" header="登录时间" sortable="true" converter="datetimeFormatter"
							width="130"></w:outputColumn>
						<w:outputColumn id="latestActTime" header="离线时间" sortable="true" converter="datetimeFormatter"
							width="130"></w:outputColumn>
						<w:outputColumn id="timeInterval" header="在线时间" converter="dataTimeConverter" width="100"></w:outputColumn>
						<w:outputColumn id="ipAddress" header="用户IP" sortable="true"></w:outputColumn>
						<w:outputColumn id="modules" header="访问模块" wrap="true" width="300"
							converter="modulesConverter"></w:outputColumn>
						<w:pagingToolbar displayInfo="true" displayMsg="显示 {0} - {1}，共 {2} 条" />
					</w:dataGrid>
				</layout:panel>
			</layout:panel>
		</w:form>
	</w:page>
</f:view>